import { fileURLToPath } from "node:url";

export const UPLOAD_PATH = fileURLToPath(
  new URL("../../uploads", import.meta.url)
);

export const OUTPUT_PATH = fileURLToPath(
  new URL("../../output", import.meta.url)
);

export const PYTHON_PATH = fileURLToPath(
  new URL("../python/venv/bin/python", import.meta.url)
);

export const CODEC_MAP = {
  mp4: {
    codec: "libx264",
    options: ["-c:v libx264", "-c:a aac"],
  },
  webm: {
    codec: "libvpx-vp9",
    options: ["-c:v libvpx-vp9", "-c:a libopus"],
  },
  mov: {
    codec: "prores",
    options: ["-c:v prores", "-c:a copy", "-profile:v 0"],
  },
  // avi: {
  //   codec: "libaom-av1",
  //   options: ["-c:v libaom-av1", "-c:a libvorbis"],
  // },
  avi: {
    codec: "libx264",
    options: ["-c:v libx264", "-c:a aac"],
  },
  mkv: {
    codec: "libx264",
    options: ["-c copy"],
  },
  flv: {
    codec: "libx264",
    options: ["-c:v libx264", "-c:a aac"],
  },
  wmv: {
    codec: "libx264",
    options: ["-c:v libx264", "-c:a aac"],
  },
  mpeg: {
    codec: "libx264",
    options: ["-c:v libx264", "-c:a aac"],
  },
};

export const taskList = new Map();
